<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: src/wickrcrypto/include/wickrcrypto/ecdsa.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_92a70b6cc7e213c660915fdf1190028f.html">wickrcrypto</a></li><li class="navelem"><a class="el" href="dir_db4377ef08cfba82f5e7141624102360.html">include</a></li><li class="navelem"><a class="el" href="dir_2adb4122f2f58e588d09641dee9865e2.html">wickrcrypto</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ecdsa.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2012-2018 Wickr Inc.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * ONLY.  COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED.  For additional details,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * please see LICENSE</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * THE CODE IS MADE AVAILABLE &quot;AS-IS&quot; AND WITHOUT ANY EXPRESS OR</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef ecdsa_h</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define ecdsa_h</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;eckey.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;digest.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structwickr__ecdsa__result.html">   54</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result</a> {</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structwickr__ecdsa__result.html#a76bcae0ea46e0f99bfd8fb70aac165bb">   55</a></span>&#160;    <a class="code" href="structwickr__ec__curve.html">wickr_ec_curve_t</a> <a class="code" href="structwickr__ecdsa__result.html#a76bcae0ea46e0f99bfd8fb70aac165bb">curve</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structwickr__ecdsa__result.html#a33c820900693a016ac43702e76b54cff">   56</a></span>&#160;    <a class="code" href="structwickr__digest.html">wickr_digest_t</a> <a class="code" href="structwickr__ecdsa__result.html#a33c820900693a016ac43702e76b54cff">digest_mode</a>;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structwickr__ecdsa__result.html#ada32a17d9f713f84142fc6a338ebcc48">   57</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__ecdsa__result.html#ada32a17d9f713f84142fc6a338ebcc48">sig_data</a>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;};</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result</a> <a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *<a class="code" href="group__wickr__ecdsa__result.html#ga7e199a7c851fd07fb93180fb3a242749">wickr_ecdsa_result_create</a>(<a class="code" href="structwickr__ec__curve.html">wickr_ec_curve_t</a> <a class="code" href="structwickr__ecdsa__result.html#a76bcae0ea46e0f99bfd8fb70aac165bb">curve</a>, <a class="code" href="structwickr__digest.html">wickr_digest_t</a> <a class="code" href="structwickr__ecdsa__result.html#a33c820900693a016ac43702e76b54cff">digest_mode</a>, <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__ecdsa__result.html#ada32a17d9f713f84142fc6a338ebcc48">sig_data</a>);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="group__wickr__ecdsa__result.html#ga417d1186e93d6ae4ee4cf701a2bfb1b2">wickr_ecdsa_result_serialize</a>(<span class="keyword">const</span> <a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *result);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *<a class="code" href="group__wickr__ecdsa__result.html#gaa3a5ba5ce3df076cf5a9984f68e34c3a">wickr_ecdsa_result_create_from_buffer</a>(<span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *<a class="code" href="group__wickr__ecdsa__result.html#ga8664bbdec0bc8b354b3cb35704c42f57">wickr_ecdsa_result_copy</a>(<span class="keyword">const</span> <a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *source);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__ecdsa__result.html#ga84fb120b34b4b7ede4042009c735ea5d">wickr_ecdsa_result_destroy</a>(<a class="code" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> **result);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ecdsa_h */</span><span class="preprocessor"></span></div><div class="ttc" id="structwickr__ecdsa__result_html_a33c820900693a016ac43702e76b54cff"><div class="ttname"><a href="structwickr__ecdsa__result.html#a33c820900693a016ac43702e76b54cff">wickr_ecdsa_result::digest_mode</a></div><div class="ttdeci">wickr_digest_t digest_mode</div><div class="ttdef"><b>Definition:</b> ecdsa.h:56</div></div>
<div class="ttc" id="group__wickr__ecdsa__result_html_ga7e199a7c851fd07fb93180fb3a242749"><div class="ttname"><a href="group__wickr__ecdsa__result.html#ga7e199a7c851fd07fb93180fb3a242749">wickr_ecdsa_result_create</a></div><div class="ttdeci">wickr_ecdsa_result_t * wickr_ecdsa_result_create(wickr_ec_curve_t curve, wickr_digest_t digest_mode, wickr_buffer_t *sig_data)</div></div>
<div class="ttc" id="structwickr__buffer_html"><div class="ttname"><a href="structwickr__buffer.html">wickr_buffer</a></div><div class="ttdoc">Represents an array of bytes and the length of the allocation associated with those bytes.</div><div class="ttdef"><b>Definition:</b> buffer.h:51</div></div>
<div class="ttc" id="structwickr__ecdsa__result_html"><div class="ttname"><a href="structwickr__ecdsa__result.html">wickr_ecdsa_result</a></div><div class="ttdoc">Elliptic Curve Digital Signature Algorithm Result.</div><div class="ttdef"><b>Definition:</b> ecdsa.h:54</div></div>
<div class="ttc" id="structwickr__ecdsa__result_html_ada32a17d9f713f84142fc6a338ebcc48"><div class="ttname"><a href="structwickr__ecdsa__result.html#ada32a17d9f713f84142fc6a338ebcc48">wickr_ecdsa_result::sig_data</a></div><div class="ttdeci">wickr_buffer_t * sig_data</div><div class="ttdef"><b>Definition:</b> ecdsa.h:57</div></div>
<div class="ttc" id="group__wickr__ecdsa__result_html_ga84fb120b34b4b7ede4042009c735ea5d"><div class="ttname"><a href="group__wickr__ecdsa__result.html#ga84fb120b34b4b7ede4042009c735ea5d">wickr_ecdsa_result_destroy</a></div><div class="ttdeci">void wickr_ecdsa_result_destroy(wickr_ecdsa_result_t **result)</div></div>
<div class="ttc" id="group__wickr__ecdsa__result_html_gaa3a5ba5ce3df076cf5a9984f68e34c3a"><div class="ttname"><a href="group__wickr__ecdsa__result.html#gaa3a5ba5ce3df076cf5a9984f68e34c3a">wickr_ecdsa_result_create_from_buffer</a></div><div class="ttdeci">wickr_ecdsa_result_t * wickr_ecdsa_result_create_from_buffer(const wickr_buffer_t *buffer)</div></div>
<div class="ttc" id="group__wickr__ecdsa__result_html_ga8664bbdec0bc8b354b3cb35704c42f57"><div class="ttname"><a href="group__wickr__ecdsa__result.html#ga8664bbdec0bc8b354b3cb35704c42f57">wickr_ecdsa_result_copy</a></div><div class="ttdeci">wickr_ecdsa_result_t * wickr_ecdsa_result_copy(const wickr_ecdsa_result_t *source)</div></div>
<div class="ttc" id="structwickr__digest_html"><div class="ttname"><a href="structwickr__digest.html">wickr_digest</a></div><div class="ttdoc">Digest function parameters.</div><div class="ttdef"><b>Definition:</b> digest.h:54</div></div>
<div class="ttc" id="structwickr__ecdsa__result_html_a76bcae0ea46e0f99bfd8fb70aac165bb"><div class="ttname"><a href="structwickr__ecdsa__result.html#a76bcae0ea46e0f99bfd8fb70aac165bb">wickr_ecdsa_result::curve</a></div><div class="ttdeci">wickr_ec_curve_t curve</div><div class="ttdef"><b>Definition:</b> ecdsa.h:55</div></div>
<div class="ttc" id="structwickr__ec__curve_html"><div class="ttname"><a href="structwickr__ec__curve.html">wickr_ec_curve</a></div><div class="ttdoc">Metadata about curve types to help with key generation, and signatures.</div><div class="ttdef"><b>Definition:</b> eckey.h:65</div></div>
<div class="ttc" id="group__wickr__ecdsa__result_html_ga417d1186e93d6ae4ee4cf701a2bfb1b2"><div class="ttname"><a href="group__wickr__ecdsa__result.html#ga417d1186e93d6ae4ee4cf701a2bfb1b2">wickr_ecdsa_result_serialize</a></div><div class="ttdeci">wickr_buffer_t * wickr_ecdsa_result_serialize(const wickr_ecdsa_result_t *result)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
